import request from '@/utils/request'

// 申请退换货
export async function refundApply(params) {
  const res = await request({
    url: '/refund/apply',
    method: 'post',
    data: params || {}
  })
  return res
}
// 申请退换货修改
export async function refundEdit(params) {
  const res = await request({
    url: '/refund/apply/edit',
    method: 'post',
    data: params || {}
  })
  return res
}
// 售后单列表
export async function refundList(params) {
  const res = await request({
    url: '/refund/list',
    method: 'post',
    data: params || {}
  })
  return res
}
// 取消售后
export async function refundCancel(params) {
  const res = await request({
    url: '/refund/cancel',
    method: 'post',
    data: params || {}
  })
  return res
}

// 详情
export async function refundDetail(params) {
  const res = await request({
    url: '/refund/detail',
    method: 'post',
    data: params || {}
  })
  return res
}

// 提交/修改物流信息
export async function refundExpress(params) {
  const res = await request({
    url: '/refund/express',
    method: 'post',
    data: params || {}
  })
  return res
}
// 查询物流公司列表
export async function refundExpressCompany(params) {
  const res = await request({
    url: '/refund/express/company',
    method: 'post',
    data: params || {}
  })
  return res
}
// 申请退换货初始化接口
export async function refundInit(params) {
  const res = await request({
    url: '/refund/init',
    method: 'post',
    data: params || {}
  })
  return res
}
// 退还款记录
export async function refundLog(params) {
  const res = await request({
    url: '/refund/log',
    method: 'post',
    data: params || {}
  })
  return res
}

